#include "stdio.h"
long count = 0;
long ways(int stairs) {
  count++;
  if (stairs <= 0)
    return -1;
  switch (stairs) {
  case 1:
    return 1;
  case 2:
    return 2;
  case 3:
    return 4;
  default:
    return ways(stairs - 1) + ways(stairs - 2) + ways(stairs - 3);
  }
}
int main() {
  int stairs = 3;
  long result;
  scanf("%i", &stairs);
  result = ways(stairs);
  printf("%ld(%lx)\n", result, result);
  printf("(%ld-%lx)\n", count, count);
  return 0;
}
